package com.arpa.wms.mapper;

import com.arpa.wms.domain.dto.PutawayItemDTO;
import com.arpa.wms.domain.entity.PutawayItem;
import com.arpa.wms.domain.vo.PutawayItemVO;
import com.arpa.wms.domain.vo.PutawayItemWithRegisterVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 上架明细 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
public interface PutawayItemMapper extends BaseMapper<PutawayItem> {

    /**
     * 查询列表
     * @param putawayItemDTO
     * @return
     */
    List<PutawayItemVO> queryList(PutawayItemDTO putawayItemDTO);

    /**
     * 查询合计,包含总数
     * @param putawayItemDTO
     * @return
     */
    PutawayItemVO queryListSum(PutawayItemDTO putawayItemDTO);

    /**
     * 根据code字符串获取上架单详情列表
     * @param codes
     * @return
     */
    List<PutawayItemVO> getListByCodes(@Param("codes")List<String> codes,@Param("groupCode") String groupCode);

    /**
     * 与确认单联合查询
     * @param putawayItemDTO
     * @return
     */
    List<PutawayItemWithRegisterVO> queryItemWithRegisterList(PutawayItemDTO putawayItemDTO);

    /**
     * @description
     * 更新上架明细的已上架数量
     * @author xuyang
     * @date 2020/10/30 16:32
     * @param code:
     * @param registerStatus:
     **/
    int updateRegisterQuantity(@Param("code")String code, @Param("registerStatus")String registerStatus,@Param("groupCode") String groupCode);

    /**
     * 通过任务标识获取对应上架单货主标识
     * @author liuxr
     * @date 2021/8/25 16:22
     * @param taskCode
     * @return java.lang.String
     */
    String getShipmentCodeByTaskCode(String taskCode);
}
